<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script type="text/javascript" src="./webview.min.js"></script>
  <script src="./react-core-18.0.0.js"></script>
  <script src="./react-dom-18.0.0.js"></script>
  <script src="./babel.js"></script>
  <script src="./registryReactObj.js"></script>
  <link rel="stylesheet" type="text/css" href="./ReactComponents/DatePicker/datePicker.css">
</head>

<body>
  <div>asdasd</div>
  <div id="datePicker"></div>
  <button id="bt"> 原生按钮 </button>
  <button id="btB"> 获取时间组件的数据 </button>
</body>
<script type="text/babel" src="./ReactComponents/DatePicker/index.js"></script>
<script>
  var bt = document.querySelector("#bt");
  var btB = document.querySelector("#btB");
  bt.onclick = () => {
    const { openDatePicker } = window.$React.DatePicker._internalRoot.context.current;
    let params = { type: "date-time", value: { years: 1993, months: 12, days: 27, hours: 12, minites: 12, seconds: 12 } };
    openDatePicker(params)
  };
  btB.onclick = () => {
    const { getTimeData } = window.$React.DatePicker._internalRoot.context.current;
    console.log(getTimeData())
  }
</script>

</html>